﻿<%@ Page Language="C#" Theme="SkinFile" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ServicioPerforacion.aspx.cs" Inherits="ServicioPerforacion" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:UpdatePanel runat="server" id="upl">
    <ContentTemplate>
        <table style="width:100%;">
            <tr>
                <td>
                    <asp:Button ID="cmdNuevo" runat="server" Text="Nuevo" />
                    &nbsp;&nbsp;&nbsp;
                    <asp:Button ID="cmdLimpiar" runat="server" Text="Limpiar" />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="cmdGrabar" runat="server" Text="Grabar" />
                    &nbsp;&nbsp;&nbsp;
                    <asp:Button ID="cmdConsultar" runat="server" Text="Consultar" />
                    &nbsp;&nbsp;
                    <asp:Button ID="cmdAnular" runat="server" Text="Anular" />
                    &nbsp;&nbsp;
                    <asp:Button ID="cmdCerrar" runat="server" Text="Cerrar" />
                </td>
                <td>
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
        <table style="width:100%;" width="80%">
            <tr>
                <td>
                    <asp:Label ID="Label4" runat="server" Text="ID Servicio Perforacion"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtIDServicio" runat="server"></asp:TextBox>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label5" runat="server" Text="Cliente"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="DDLCliente" runat="server">
                    </asp:DropDownList>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label6" runat="server" Text="Fecha Inicio"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtFechaInicio" runat="server"></asp:TextBox>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label7" runat="server" Text="Fecha Fin"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtFechaFin" runat="server"></asp:TextBox>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label8" runat="server" Text="Fecha Ultimo Cambio"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtFechaUltimoCambio" runat="server"></asp:TextBox>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    Precio</td>
                <td>
                    <asp:TextBox ID="txtPrecio" runat="server"></asp:TextBox>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label10" runat="server" Text="Observaciones"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtObservaciones" runat="server" Height="89px" Width="236px"></asp:TextBox>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
        <table style="width:100%;">
            <tr>
                <td style="width: 801px">
                    <table style="width:100%;" border="0.5">
                        <tr>
                            <td>
                                <asp:Label ID="Label11" runat="server" Text="ID Pozo"></asp:Label>
                            </td>
                            <td style="width: 267px">
                                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                            </td>
                            <td>
                                <asp:Label ID="Label12" runat="server" Text="Maquinaria"></asp:Label>
                            </td>
                            <td>
                                <asp:DropDownList ID="DDLMaquinaria" runat="server" Height="16px" Width="169px">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="Label17" runat="server" Text="Label"></asp:Label>
                            </td>
                            <td style="width: 267px">
                                <asp:TextBox ID="TextBox2" runat="server" ontextchanged="TextBox2_TextChanged"></asp:TextBox>
                            </td>
                            <td>
                                <asp:Label ID="Label14" runat="server" Text="Coordenadas"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="Label18" runat="server" Text="Ubicacion"></asp:Label>
                            </td>
                            <td style="width: 267px">
                                <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
                            </td>
                            <td>
                                <asp:Label ID="Label16" runat="server" Text="Observaciones"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
        <table style="width:100%;">
            <tr>
                <td style="width: 802px">
                    <asp:GridView ID="gvPozo" runat="server" AllowPaging="True" 
                        AutoGenerateColumns="False" CellPadding="2" 
                        OnRowDeleting="gvPozo_RowDeleting" 
                        onselectedindexchanged="gvPozo_SelectedIndexChanged" PageSize="10" 
                        SkinID="gridviewSkin">
                        <EmptyDataTemplate>
                            No hay registros por mostrar.
                        </EmptyDataTemplate>
                        <Columns>
                            <asp:TemplateField Visible="False">
                                <ItemTemplate>
                                    <asp:Label ID="lblID" runat="server" 
                                        Text='<%# Eval("ID_Pozo")  %>' Visible="false"></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="ID_Pozo" 
                                HeaderText="ID Pozo">
                                <HeaderStyle Width="100px" />
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="ID_Maquinaria" HeaderText="ID_Maquinaria">
                                <HeaderStyle Width="100px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Metraje" HeaderText="Coordenadas">
                                <ItemStyle HorizontalAlign="Left" />
                                <HeaderStyle Width="100px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Coordenadas" HeaderText="Coordenadas">
                                <HeaderStyle Width="100px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Ubicacion" HeaderText="Ubicacion">
                                <ItemStyle HorizontalAlign="Left" />
                                <HeaderStyle Width="100px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Observaciones" HeaderText="Observaciones">
                                <HeaderStyle Width="100px" />
                            </asp:BoundField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:LinkButton ID="lnkEliminar" runat="server" CommandName="Delete" 
                                        OnClientClick="return confirm('¿Esta seguro que desea eliminar este registro?');" 
                                        Text="Eliminar" />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <RowStyle CssClass="gridItem" HorizontalAlign="Center" />
                        <EditRowStyle CssClass="gridItem" HorizontalAlign="Center" />
                        <PagerStyle CssClass="gridItem" />
                        <HeaderStyle CssClass="gridHead" HorizontalAlign="Center" />
                        <AlternatingRowStyle CssClass="gridItem" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
        <br />
        
    </ContentTemplate>
    </asp:UpdatePanel>    
</asp:Content>